<script setup>
import { ref } from 'vue'

const hRef = ref(null)
const clickFn = () => {
  console.log(hRef.value);
  hRef.value.innerText = '为所欲为'
}
</script>

<template>
  <h1 ref="hRef">名字随便起xxx都行</h1>
  <button @click="clickFn">操作dom</button>
</template>

<style scoped></style>
